{{import os}}
<script src="{{=URL(r=request,c='static',f='jquery.js')}}" type="text/javascript"></script>
<script type="text/javascript"><!--
jQuery.noConflict();
function popup(url) {
  newwindow=window.open(url,'name','height=400,width=600');
  if (window.focus) newwindow.focus();
  return false;
}
function collapse(id) { jQuery('#'+id).slideToggle(); }
function fade(id,value) { if(value>0) jQuery('#'+id).hide().fadeIn('slow'); else jQuery('#'+id).show().fadeOut('slow'); }
function ajax(u,s,t) {
  var query="";
  for(i=0; i<s.length; i++) { 
     if(i>0) query=query+"&";
     query=query+encodeURIComponent(s[i])+"="+encodeURIComponent(document.getElementById(s[i]).value);
  }
  jQuery.ajax({type: "POST", url: u, data: query, success: function(msg) { document.getElementById(t).innerHTML=msg; } });  
}
String.prototype.reverse = function () { return this.split('').reverse().join('');};
jQuery(document).ready(function() {
jQuery('.hidden').hide();
jQuery('.error').hide().slideDown('slow');
jQuery('.flash').hide().slideDown('slow')
jQuery('.flash').click(function() { jQuery(this).fadeOut('slow'); return false; });
jQuery('input.string').attr('size',50);
jQuery('textarea.text').attr('cols',50).attr('rows',10);
jQuery('input.integer').keyup(function(){this.value=this.value.reverse().replace(/[^0-9\-]|\-(?=.)/g,'').reverse();});
jQuery('input.double').keyup(function(){this.value=this.value.reverse().replace(/[^0-9\-\.]|[\-](?=.)|[\.](?=[0-9]*[\.])/g,'').reverse();});
jQuery('input.delete').attr('onclick','if(this.checked) if(!confirm("{{=T('Sure you want to delete this object?')}}")) this.checked=false;');
try {jQuery("input.date").focus( function() {Calendar.setup({
     inputField:this.id, ifFormat:"{{=T('%Y-%m-%d')}}", showsTime:false
}); }); } catch(e) {};
try { jQuery("input.datetime").focus( function() {Calendar.setup({
     inputField:this.id, ifFormat:"{{=T('%Y-%m-%d %H:%M:%S')}}", showsTime: true,timeFormat: "24"
}); }); } catch(e) {};
try { jQuery("input.time").clockpick({
     starthour:0, endhour:23, showminutes:true, military:true
}); } catch(e) {};
});
//--></script>
